package com.sg.dto.integration.calc;

import com.sg.common.dto.BaseDto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;
import java.util.Objects;

/**
 * @desc UpdateCycleDto
 * @使用场景
 */
@Data
public class UpdateCycleDto extends BaseDto implements Serializable {

    /**
     * 更新周期ID
     */
    @ApiModelProperty("更新周期ID")
    private String updateCycleId;

    /**
     * 更新周期开始时间
     */
    @ApiModelProperty("更新周期开始时间")
    private Date updateCycleStartTime;

    /**
     * 更新周期结束时间
     */
    @ApiModelProperty("更新周期结束时间")
    private Date updateCycleEndTime;

    /**
     * 更新周期类型标识
     */
    @ApiModelProperty("更新周期类型标识")
    private String updateCycleTypeCode;

    /**
     * 执行周期阶段ID
     */
    @ApiModelProperty("执行周期阶段ID")
    private String executeCycleStageId;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;
        UpdateCycleDto that = (UpdateCycleDto) o;
        return (
                updateCycleId == that.updateCycleId &&
                        updateCycleStartTime == that.updateCycleStartTime &&
                        updateCycleEndTime == that.updateCycleEndTime &&
                        updateCycleTypeCode == that.updateCycleTypeCode &&
                        executeCycleStageId == that.executeCycleStageId
        );
    }

    @Override
    public int hashCode() {
        return Objects.hash(
                super.hashCode(),
                updateCycleId,
                updateCycleStartTime,
                updateCycleEndTime,
                updateCycleTypeCode,
                executeCycleStageId
        );
    }

}
